package router

import (
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/net/ghttp"
)

// renderTpl 统一的模板渲染函数
func renderTpl(r *ghttp.Request, tplPath string) {
	url := r.URL.Path
	r.Response.WriteTpl(tplPath, g.Map{
		"func_url": url,
	})
}

var Login = login{}

type login struct{}

func (*login) Index(r *ghttp.Request) {
	renderTpl(r, "/Login/Login_new.html")
}

func (*login) Register(r *ghttp.Request) {
	renderTpl(r, "/Login/Register.html")
}

var Dashboard = dashboard{}

type dashboard struct{}

func (*dashboard) Index(r *ghttp.Request) {
	renderTpl(r, "/Dashboard/Index.html")
}

var Home = home{}

type home struct{}

func (*home) Index(r *ghttp.Request) {
	renderTpl(r, "/Home/Index.html")
}

var Device = device{}

type device struct{}

func (*device) List(r *ghttp.Request) {
	renderTpl(r, "/Device/List.html")
}

func (*device) FeedNodes(r *ghttp.Request) {
	renderTpl(r, "/Device/FeedNodes.html")
}

func (*device) FeedNodesNew(r *ghttp.Request) {
	renderTpl(r, "/Device/FeedNodesNew.html")
}

func (*device) Para(r *ghttp.Request) {
	renderTpl(r, "/Device/Para.html")
}

func (*device) ParaReadonly(r *ghttp.Request) {
	renderTpl(r, "/Device/ParaReadonly.html")
}
func (*device) ParaFgReadonly(r *ghttp.Request) {
	renderTpl(r, "/Device/ParaFgReadonly.html")
}
func (*device) ParaOpHisReadonly(r *ghttp.Request) {
	renderTpl(r, "/Device/ParaOpHisReadonly.html")
}

func (*device) ReplaceFeedNode(r *ghttp.Request) {
	renderTpl(r, "/Device/ReplaceFeedNode.html")
}

func (*device) ReplaceGw(r *ghttp.Request) {
	renderTpl(r, "/Device/ReplaceGw.html")
}

func (*device) Query(r *ghttp.Request) {
	renderTpl(r, "/Device/Query.html")
}

func (*device) JyNodes(r *ghttp.Request) {
	renderTpl(r, "/Device/JyNodes.html")
}

var Farm = farm{}

type farm struct{}

func (*farm) Topo(r *ghttp.Request) {
	renderTpl(r, "/Farm/Topo.html")
}

func (*farm) Status(r *ghttp.Request) {
	renderTpl(r, "/Farm/Status.html")
}

func (*farm) StatusNew(r *ghttp.Request) {
	renderTpl(r, "/Farm/StatusNew.html")
}

var House = house{}

type house struct{}

func (*house) Status(r *ghttp.Request) {
	renderTpl(r, "/House/Status.html")
}

var Topo = topo{}

type topo struct{}

func (*topo) Group(r *ghttp.Request) {
	renderTpl(r, "/Topo/Group.html")
}

func (*topo) Area(r *ghttp.Request) {
	renderTpl(r, "/Topo/Area.html")
}

func (*topo) Tree(r *ghttp.Request) {
	renderTpl(r, "/Topo/Tree.html")
}

func (*topo) TreeNew(r *ghttp.Request) {
	renderTpl(r, "/Topo/TreeNew.html")
}

func (*topo) Device(r *ghttp.Request) {
	renderTpl(r, "/Topo/Device.html")
}

func (*topo) Permission(r *ghttp.Request) {
	renderTpl(r, "/Topo/Permission.html")
}

var RBAC = rbac{}

type rbac struct{}

func (*rbac) User(r *ghttp.Request) {
	renderTpl(r, "/RBAC/User.html")
}

func (*rbac) Role(r *ghttp.Request) {
	renderTpl(r, "/RBAC/Role.html")
}

func (*rbac) Func(r *ghttp.Request) {
	renderTpl(r, "/RBAC/Func.html")
}

func (*rbac) Permission(r *ghttp.Request) {
	renderTpl(r, "/RBAC/Permission.html")
}

func (*rbac) Action(r *ghttp.Request) {
	renderTpl(r, "/RBAC/Action.html")
}

func (*rbac) ApiMap(r *ghttp.Request) {
	renderTpl(r, "/RBAC/ApiMap.html")
}

var Admin = admin{}

type admin struct{}

func (*admin) LoginLog(r *ghttp.Request) {
	renderTpl(r, "/Admin/LoginLog.html")
}

func (*admin) OpLog(r *ghttp.Request) {
	renderTpl(r, "/Admin/OpLog.html")
}

func (*admin) Firmware(r *ghttp.Request) {
	renderTpl(r, "/Admin/Firmware.html")
}

func (*admin) FirmwareUpload(r *ghttp.Request) {
	renderTpl(r, "/Admin/FirmwareUpload.html")
}

func (*admin) Dictionary(r *ghttp.Request) {
	renderTpl(r, "/Admin/Dictionary.html")
}

func (*admin) Schedule(r *ghttp.Request) {
	renderTpl(r, "/Admin/Schedule.html")
}

var UserProfile = userProfile{}

type userProfile struct{}

func (*userProfile) Profile(r *ghttp.Request) {
	renderTpl(r, "/UserProfile/Profile.html")
}

func (*userProfile) Pwd(r *ghttp.Request) {
	renderTpl(r, "/UserProfile/Pwd.html")
}

var History = history{}

type history struct{}

func (*history) FeedRecord(r *ghttp.Request) {
	renderTpl(r, "/History/FeedRecord.html")
}

func (*history) FeedRecordNew(r *ghttp.Request) {
	renderTpl(r, "/History/FeedRecordNew.html")
}

func (*history) FeedRecordSimple(r *ghttp.Request) {
	renderTpl(r, "/History/FeedRecordSimple.html")
}

func (*history) FeedBnRecordSimple(r *ghttp.Request) {
	renderTpl(r, "/History/FeedBnRecordSimple.html")
}

func (*history) FeedJyRecordSimple(r *ghttp.Request) {
	renderTpl(r, "/History/FeedJyRecordSimple.html")
}

func (*history) FeedHisDay(r *ghttp.Request) {
	renderTpl(r, "/History/FeedHisDay.html")
}

func (*history) OpLogSetPara(r *ghttp.Request) {
	renderTpl(r, "/History/OpLogSetPara.html")
}

func (*history) OpLogSetDay(r *ghttp.Request) {
	renderTpl(r, "/History/OpLogSetDay.html")
}

func (*history) OpLogSetCalc(r *ghttp.Request) {
	renderTpl(r, "/History/OpLogSetCalc.html")
}

func (*history) DeliverLog(r *ghttp.Request) {
	renderTpl(r, "/History/DeliverLog.html")
}

var Alarm = alarm{}

type alarm struct{}

func (*alarm) Now(r *ghttp.Request) {
	renderTpl(r, "/Alarm/Now.html")
}

func (*alarm) History(r *ghttp.Request) {
	renderTpl(r, "/Alarm/History.html")
}

var Feed = feed{}

type feed struct{}

func (*feed) FeedPlan(r *ghttp.Request) {
	renderTpl(r, "/Feed/FeedPlan.html")
}

func (*feed) FeedPlanNew(r *ghttp.Request) {
	renderTpl(r, "/Feed/FeedPlanNew.html")
}

func (*feed) FeedPlanParaReadonly(r *ghttp.Request) {
	renderTpl(r, "/Feed/FeedPlanParaReadonly.html")
}

func (*feed) FeedPlanParaEdit(r *ghttp.Request) {
	renderTpl(r, "/Feed/FeedPlanParaEdit.html")
}
func (*feed) FgPlanParaEdit(r *ghttp.Request) {
	renderTpl(r, "/Feed/FgPlanParaEdit.html")
}
func (*feed) FgPlanParaReadonly(r *ghttp.Request) {
	renderTpl(r, "/Feed/FgPlanParaReadonly.html")
}

var Ext = ext{}

type ext struct{}

func (*ext) Weather(r *ghttp.Request) {
	renderTpl(r, "/Ext/Weather.html")
}
